home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / interapplication comm / suspendappleevent / suspendevent.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  2.8 KB  |  84 lines

  1. /*
  2.     File:        SuspendEvent.h
  3.  
  4.     Contains:    
  5.  
  6.     Written by: C.K. Haun    
  7.  
  8.     Copyright:    Copyright © 1991-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 7/21/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 
  21.  
  22. */
  23. #include <Types.h>
  24. #include <memory.h>
  25. #include <Packages.h>
  26. #include <Errors.h>
  27. #include <quickdraw.h>
  28. #include <fonts.h>
  29. #include <dialogs.h>
  30. #include <windows.h>
  31. #include <menus.h>
  32. #include <events.h>
  33. #include <OSEvents.h>
  34. #include <Desk.h>
  35. #include <diskinit.h>
  36. #include <OSUtils.h>
  37. #include <resources.h>
  38. #include <toolutils.h>
  39. #include <AppleEvents.h>
  40. #include <EPPC.h>
  41. #include <GestaltEqu.h>
  42. #include <PPCToolbox.h> 
  43. #include <Processes.h>
  44. #include <Balloons.h>
  45. #include <aliases.h>
  46.  
  47. /* windowControl is the structure attached to every window I create (in the refCon */
  48. /* field) that contains all the information I need to know about the window. */
  49. /* data, procedure pointers for controlling, and anything else gets put in this */
  50. /* struct.  That makes my windows autonomous */
  51. struct windowControl {
  52.     unsigned long windowID;                                 /* master ID number  */
  53.     ProcPtr drawMe;                                         /* content drawing procedure pointer */
  54.     ProcPtr clickMe;                                        /* content click routine */
  55.     ProcPtr closeMe;                                        /* document close procedure pointer */
  56.     ProcPtr sizeMe;                                            /* size procedure */
  57.     AliasHandle fileAliasHandle;                            /* alias for this document */
  58.     Boolean windowDirty;
  59.     Handle generalData;                                        /* cast to whatever you need as you need it */
  60. };
  61. typedef struct windowControl windowControl, *windowCPtr, **windowCHandle;
  62.  
  63. enum {kDocWindowResID = 128,kMyDocumentWindow = 1000};
  64. /* menu enums */
  65. enum {kMBarID = 128};
  66. enum {kAppleMenu = 128,kFileMenu,kEditMenu,kToolsMenu};
  67.  
  68. /* file menu enums */
  69. enum {kNewItem = 1,kOpenItem,kCloseItem,kSaveItem,kSaveAsItem,kFileBlank1,kPageSetupItem,kPrintItem,kFileBlank2,kQuitItem};
  70.  
  71. /* general purpose enums */
  72. enum {kResumeMask=1,kSampHelp=129,kAboutBox=128,kHelpString=128,kBadSystem=130};
  73.  
  74. enum {kMinHeight = 200};
  75.  
  76. enum {kGeneralStrings=128};
  77. enum {kPendingWords1=1,kPendingWords2};
  78.  
  79.  
  80.  
  81. #define kSuspCreator 0x11171915
  82.  
  83. #define kFredDocType 'FRED'
  84. #define kAlDocType 'AL  '